#ifndef NX_CRYPTO_STANDALONE_ENABLE
#include "nx_api.h"
#else
#include "nx_crypto_port.h"
#endif

typedef struct
{
    UINT algorithm;
    UCHAR *key;
    UINT key_len;
    UCHAR *iv;
    UINT iv_len;
    UCHAR *plain;
    UINT plain_len;
    UCHAR *secret;
    UINT secret_len;
} AES_DATA;

/* 3F1EDC0698B1D258DE68EE79340A752149B609286057E16E73C39F36D2D61D0B */
static UCHAR key_ctr_256_99[] = {
0x3F, 0x1E, 0xDC, 0x06, 0x98, 0xB1, 0xD2, 0x58, 0xDE, 0x68, 0xEE, 0x79, 0x34, 0x0A, 0x75, 0x21, 
0x49, 0xB6, 0x09, 0x28, 0x60, 0x57, 0xE1, 0x6E, 0x73, 0xC3, 0x9F, 0x36, 0xD2, 0xD6, 0x1D, 0x0B, 
};

/* F9999E1CCC7798453C31FD0200000001 */
static UCHAR iv_ctr_256_99[] = {
0xF9, 0x99, 0x9E, 0x1C, 0xCC, 0x77, 0x98, 0x45, 0x3C, 0x31, 0xFD, 0x02, 0x00, 0x00, 0x00, 0x01, 
};

/* Input the plain text which is not multiples of 16. */
static UCHAR plain_ctr_256_99[] = { 0x0, 0x0, 0x0, 0x0};

/* A42E843B22E6CC7C09AD783FACE7F251 */
static UCHAR key_cbc_128_0[] = {
0xA4, 0x2E, 0x84, 0x3B, 0x22, 0xE6, 0xCC, 0x7C, 0x09, 0xAD, 0x78, 0x3F, 0xAC, 0xE7, 0xF2, 0x51, 
};

/* 87BFAE15B37B90751B426240F5BC0C16 */
static UCHAR iv_cbc_128_0[] = {
0x87, 0xBF, 0xAE, 0x15, 0xB3, 0x7B, 0x90, 0x75, 0x1B, 0x42, 0x62, 0x40, 0xF5, 0xBC, 0x0C, 0x16, 
};

/* 997F8E2A478FF2479A83B90BD44EDE5C */
static UCHAR plain_cbc_128_0[] = { 0x0, 0x0, 0x0, 0x0};

/* A42E843B22E6CC7C09AD783FACE7F251 */
static UCHAR key_cbc_128_1[] = {
0xA4, 0x2E, 0x84, 0x3B, 0x22, 0xE6, 0xCC, 0x7C, 0x09, 0xAD, 0x78, 0x3F, 0xAC, 0xE7, 0xF2, 0x51, 
};

/* 87BFAE15B37B90751B426240F5BC0C16 */
static UCHAR iv_cbc_128_1[] = {
0x87, 0xBF, 0xAE, 0x15, 0xB3, 0x7B, 0x90, 0x75, 0x1B, 0x42, 0x62, 0x40, 0xF5, 0xBC, 0x0C, 0x16, 
};

/* 997F8E2A478FF2479A83B90BD44EDE5C */
static UCHAR plain_cbc_128_1[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10};

static AES_DATA aes_data[] =
{
{NX_CRYPTO_ENCRYPTION_AES_CTR, key_ctr_256_99, sizeof(key_ctr_256_99), iv_ctr_256_99, sizeof(iv_ctr_256_99), plain_ctr_256_99, sizeof(plain_ctr_256_99), NULL, 0},
{NX_CRYPTO_ENCRYPTION_AES_CBC, key_cbc_128_0, sizeof(key_cbc_128_0), iv_cbc_128_0, sizeof(iv_cbc_128_0), plain_cbc_128_0, sizeof(plain_cbc_128_0), NULL, 0},
{NX_CRYPTO_ENCRYPTION_AES_CBC, key_cbc_128_1, sizeof(key_cbc_128_1), iv_cbc_128_1, sizeof(iv_cbc_128_1), plain_cbc_128_1, sizeof(plain_cbc_128_1), NULL, 0},
};
